<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/7
 * Time: 12:27
 */
//include 'A.php';
//require 'B.php';
spl_autoload_register(function($class){
    if(file_exists($class.'.php')) {
        include $class.'.php';
    }

});


function autoload($class) {
    echo '你调用'.$class.'类了!<br>';
}
spl_autoload_register('autoload',true,true);

$a = new A();
$a->test();
$b = new B();
$b->test();


